<%@ page contentType="text/html;charset=UTF-8" language="java" import="org.whuims.pois.model.Wordlist"
         pageEncoding="utf-8" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%
    request.setCharacterEncoding("utf-8");
    response.setCharacterEncoding("utf-8");
%>
<%
    Wordlist wordlist = (Wordlist) request.getAttribute("bean");
    String keyword=null, category1=null, important=null, topicidString=null;
    int category=0, importance=0;
    long topicid=0;
    if (wordlist!=null){
        keyword = wordlist.getKeyword();
        category = wordlist.getCategory();
        category1 = String.valueOf(category);
        importance = wordlist.getImportance();
        important = String.valueOf(importance);
        topicid = wordlist.getTopicid();
        topicidString = String.valueOf(topicid);
    }

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
    <base href="<%=basePath%>"></base>
    <title>${sessionScope.topicName} - 词表编辑</title>
    <link rel="stylesheet" type="text/css" href="css/mainPageStyle.css"/>
    <link rel="stylesheet" href="css/pagination.css"/>
    <link rel="stylesheet" href="css/subPage.css"/>
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/jquery.pagination.js"></script>
    <%@include file="../im.jsp" %>
</head>


<body>
<logic:notEmpty name="user">
    <div id="content" class="container">
        <%@include file="../top.jsp" %>
        <div class="row">
            <%@include file="../left.jsp" %>


            <div class="right col-md-10">
                <div id="right_left">
                    <html:form action="keywordAction.do?method=modify" method="post">
                        <table>

                            <tr>
                                <td>
                                    关键词
                                </td>
                                <td>
                                    <html:text property="keyword" value="<%=keyword %>"></html:text>
                                </td>
                            </tr>

                            <tr>
                                <td>
                                    负面级别
                                </td>
                                <td>
                                    <html:text property="importance" value="<%=important %>"></html:text>
                                    （1到10的范围内，数值越大，越重要）
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    负面词类别
                                </td>
                                <td>
                                    <html:text property="category" value="<%=category1 %>"></html:text>
                                </td>
                                <td>
                                    <html:hidden property="topicid" value="<%=topicidString%>"></html:hidden>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <html:submit property="submit" value="修改"></html:submit>
                                </td>
                                <td>
                                    <html:reset property="cancel" value="重置"></html:reset>
                                </td>
                            </tr>
                        </table>
                    </html:form>
                    <a href="keywordAction.do?method=show">返回</a>
                </div>
            </div>
        </div>

    </div>
</logic:notEmpty>
<logic:empty name="user">
    Access Rejected! Error 404
</logic:empty>
</body>
</html>

